package queue

import "github.com/spf13/viper"
import "log"

// StartConsumer 启动默认的消费者
func StartConsumer() {
	go func() {
		// 执行队列进程
		consumerNumber := viper.GetInt("amqp.consumerNumber")
		taskWorker := NewAsyncTaskWorker("default", consumerNumber)
		err := taskWorker.Launch()
		if err != nil {
			log.Fatal(err)
			return
		}
	}()
}
